﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace suirui.ZhuMu.MJGames.Controllers
{
    public static class ControllerExtend
    {
        public static string GetTraceId(this ControllerBase controller)
        {
            if (controller?.HttpContext?.Request == null)
            {
                return string.Empty;
            }
            return controller.HttpContext.Request.Headers["zm-traceid"];
        }
    }
}
